//@author A0096723X
///@class CommonEnum
///@Description This class holds the public enumeration types of the BOT program.
///				CommonEnum handles the following operations
///				1. toLower, takes in a string and converts to lower case for comparison
///				2. greater function for comparison of two entries, first by start/end date, then by name.
#ifndef COMMONUTILS_H
#define COMMONUTILS_H

#include <string>
#include <fstream>

#include <qdatetime.h>

#include <Entry.h>

using namespace std;
class CommonUtils
{
	//@brief assigns the date and time for use in comparison
	static void assignDate(const Entry*, QDate &, QTime &);
public:
	CommonUtils(void);
	~CommonUtils(void);
	
	static const QTime TIME_MIDNIGHT;
	static const string STRING_COMMAND_ADD;
	static const string STRING_COMMAND_DELETE;
	static const string STRING_COMMAND_SET_DONE;
	static const string STRING_COMMAND_EDIT;
	static const string STRING_COMMAND_DISPLAY;
	static const string STRING_COMMAND_DISPLAY_ALL;
	static const string STRING_COMMAND_SEARCH;
	static const string STRING_COMMAND_UNDO;
	static const string STRING_COMMAND_REDO;
	static const string STRING_COMMAND_DISPLAY_TASK;
	static const string STRING_COMMAND_DISPLAY_EVENT;
	static const string STRING_COMMAND_DISPLAY_WEEK;
	static const string STRING_COMMAND_DISPLAY_DAY;
	static const string STRING_COMMAND_DISPLAY_DAY_BEFORE;
	static const string STRING_COMMAND_CLEAR;
	static const string STRING_COMMAND_DISPLAY_DONE;
	static const string STRING_COMMAND_DISPLAY_NOT_DONE;
	static const string STRING_COMMAND_DISPLAY_TODAY;
	static const string STRING_COMMAND_EXIT;
	static const string ENTRY_TYPE_EVENT;
	static const string ENTRY_TYPE_TASK;
	static const string STRING_HEADER_TODAY;
	static const string STRING_HEADER_TOMORROW;
	static const string STRING_HEADER_OVERDUE;
	static const string STRING_HEADER_FUTURE;
	static const QString FORMAT_DATE;
	static const QString FORMAT_TIME;
	static const QString FORMAT_DATE_HEADER;

	//@brief returns a string with all capital alphabetical chars converted to lower case
	static string toLower(string);

	//@brief compares if b is greater than a, first by date, then name(alphabetically)
	static bool greater(const Entry* a,const Entry* b);
};

#endif